package com.power.web;

import com.power.model.TDicValue;
import com.power.result.R;
import com.power.service.DicValueService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class DicValueController {
    @Resource
    private DicValueService dicValueService;

    @GetMapping("/api/dicValue/{typeCode}")
    public R getDicValueList(@PathVariable(value = "typeCode") String typeCode) {
        List<TDicValue> dicValueList = dicValueService.getDicValueList(typeCode);
        return R.OK(dicValueList);
    }
}
